<!DOCTYPE html>
{% include "ic/head.html" with context %}
<body>
    <div id="wrapper">
        <nav class="navbar navbar-default navbar-cls-top " role="navigation" style="margin-bottom: 0">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".sidebar-collapse">
                <div class="text-box" >
                </div>
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="/italiaCives"></a>
            </div>

  <div style="color: white; padding: 15px 0px 5px 5px;float: right; font-size: 16px;">{{pageData["ente_def"].denominazione}} &nbsp; </div>
        </nav>
           <!-- /. NAV TOP  -->
{% include "ic/sidebar-sx.html" with context %}
        <div id="page-wrapper" >
            <div id="page-inner">
                <section>
                <div class="tabs tabs-style-underline" id="myTabs">
                    <nav>
                        <ul>
                            <li class="active">
                                <a style="color:#F87217;text-decoration:none;" href="#home" data-url="/italiaCives/dashboard_stream" class="fa fa-home fa-2x">
                                    <span>Home</span>
                                </a>
                            </li>
                            <li>
                                <a style="color:#31B0D5;text-decoration:none;" href="#news" data-url="/italiaCives/news" class="fa fa-rss fa-2x">
                                    <span>News</span>
                                </a>
                            </li>
                            <li>
                                <a style="color:#449D44;text-decoration: none;" href="#eventi" data-url="/italiaCives/news?tipo=eventi" class="fa fa-bullhorn fa-2x">
                                    <span>Eventi</span>
                                </a>
                            </li>
                            <li>
                                <a style="color:#C9302C;text-decoration:none;" href="#segnalazioni" data-url="/italiaCives/segnalazioni" class="fa fa-edit fa-2x">
                                    <span>Segnalazioni</span>
                                </a>
                            </li>
                            <li>
                                <a style="color:#5F5B59;text-decoration:none;" href="#comune" data-url="/italiaCives/segnalazioni" class="fa fa-phone fa-2x">
                                    <span>Numeri Utili</span>
                                </a>
                            </li>
                            <li>
                                <a style="color:#0040FF;text-decoration:none;" href="#cambiacomune" data-url="/italiaCives/segnalazioni" class="fa fa-refresh fa-2x">
                                    <span>Cambia Comune</span>
                                </a>
                            </li>
                        </ul>
                    </nav>
                    <div class="content-wrap">
                        <section id="home" class="tab-pane active" >
                            <p style="text-align:center;">
                                <img src="/tpl/img/ajax-loader.gif">
                            </p>
                        </section>
                        <section id="news" class="tab-pane">
                            <p style="text-align:center;">
                                <img src="/tpl/img/ajax-loader.gif">
                            </p>
                        </section>
                        <section id="eventi" class="tab-pane" >
                            <p style="text-align:center;">
                                <img src="/tpl/img/ajax-loader.gif">
                            </p>
                        </section>
                        <section id="segnalazioni" class="tab-pane">
                            <p style="text-align:center;">
                                <img src="/tpl/img/ajax-loader.gif">
                            </p>
                        </section>
                        <section id="comune" class="tab-pane">
                            <p style="text-align:center;">
                                <img src="/tpl/img/ajax-loader.gif">
                            </p>
                        </section>
                        <section id="cambiacomune" class="tab-pane">
                            <p style="text-align:center;">
                                <img src="/tpl/img/ajax-loader.gif">
                            </p>
                        </section>
                    </div><!-- /content -->
                </div><!-- /tabs -->
                </section>

            </div>
    {% include "ic/modal_cambio_ente.html" with context %}
    </div>

{% include "ic/scripts.html" with context %}
{% block custom_js %}
<script type="text/javascript">
$(document).ready(function(){

    //$('#myModall').on('hidden.bs.modal', function() {
        //$(this).removeData('bs.modal');
        //});

      //$("img").unveil();
    //$( "#ricerca_entry_articolo_modal" ).autocomplete({
        //appendTo: "#myModal",
        //source: "/pg/as_Ente/GetEnti",
        //select: function( event, ui ) {
            ////event.preventDefault(); //blocco il default perchè mi serve il campo svuotato
            //$("#id_ente").val(ui.item.id_ente);
            //$( "#ricerca_entry_articolo_modal" ).autocomplete( "close" );
        //}
            //});

    $('#myTabs a').click(function (e) {
        e.preventDefault();

        var url = $(this).attr("data-url");
        var href = this.hash;
        var pane = $(this);
        $.waypoints('refresh');
        // ajax load from data-url
        $(href).load(url,function(result){
            pane.tab('show');
        });
    });

    // load first tab content
    $('#home').load($('.active a').attr("data-url"),function(result){
      $('.active a').tab('show');
    });

    (function() {

        [].slice.call( document.querySelectorAll( '.tabs' ) ).forEach( function( el ) {
            new CBPFWTabs( el );
        });

    })();
});
</script>
{% endblock %}

</body>
</html>
